#ifndef QUESTIONCOLLECT_H
#define QUESTIONCOLLECT_H

#include <QWidget>
#include <QButtonGroup>
#include <QString>

namespace Ui {
class questioncollect;
}

class questioncollect : public QWidget
{
    Q_OBJECT

public:
    explicit questioncollect(QWidget *parent = nullptr);
    ~questioncollect();
public:
    void setQuestionContent(QString& question);                       // 设置问题的内容
    void setOptionButtonStyleSheet(int idx,QString& styleSheet);      // 设置按钮样式风格

    int getButtonSize();
signals:
    void whichOneClick(int idx);

public slots:
    void buttonGroupClickSlot(int idx);             // 按钮组按钮被按下
private:
    Ui::questioncollect *ui;
    QButtonGroup* m_answerButtonGroup;              // 选项按钮组
    QString m_defultStyleSheet;                     // 默认按钮组的样式
    int m_buttonSize;
};

#endif // QUESTIONCOLLECT_H
